package com.liezh.factory;

import cn.hutool.json.JSONUtil;

import java.util.HashMap;

/**
 * @author liezh
 * @date 2022-5-6
 */
public class JsonRuleConfigParser implements IRuleConfigParser {
    @Override
    public RuleConfig parse(String content) {
        // 解析json内容
        final HashMap hashMap = JSONUtil.parse(content).toBean(HashMap.class);
        return new RuleConfig(hashMap);
    }
}
